cmake_minimum_required ( VERSION 2.6 )
project (Playur)

add_subdirectory(boost)

find_package(Qt4 REQUIRED)
set(QT_USE_QTXML TRUE)
set(QT_USE_QTSQL TRUE)
set(QT_USE_QTDBUS TRUE)
set(QT_USE_QTNETWORK TRUE)
include (${QT_USE_FILE})

set(SOURCES networkconfig.cpp 
  collectionitemmodel.cpp 
  collection/collection.cpp
  player.cpp
  configdialog.cpp
  httpserver.cpp
  main.cpp
  connection.cpp
  buddylist.cpp
  mainwindow.cpp
  playlist.cpp
  request.cpp
  trackinfo.cpp
)

set(HEADERS
  player.h
  configdialog.h
  buddylist.h
  httpserver.h
  main.h
  networkconfig.h
  connection.h
  mainwindow.h
  playlist.h
  request.h
  collectionitemmodel.h
)

qt4_wrap_cpp(MOC_SOURCES ${HEADERS})

set(LINK
	${QT_LIBRARIES}
	tag
	ircclient-qtd
        boost_serialization
)

IF(UNIX)
include_directories(/usr/include/qt4/ircclient-qt /usr/include/phonon)
link_directories(/usr/lib/qt4)
set(LINK ${LINK} phonon)
ENDIF(UNIX)

IF(WIN32)
include_directories("C:/boost_1_46_1" C:/libircclient/include "C:/Program Files (x86)/taglib/include/")
link_directories("C:/Program Files (x86)/taglib/lib/" C:/libircclient/lib F:/Qt/2010.05/qt/lib)
set(LINK ${LINK} phonon4 )
ENDIF(WIN32)

add_executable(playur ${SOURCES} ${MOC_SOURCES})
target_link_libraries(playur ${QT_LIBRARIES} ${LINK})
